# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DFAReporting.V34.Model.CustomEventInsert do
  @moduledoc """
  Custom event to be inserted.

  ## Attributes

  *   `cmDimensions` (*type:* `GoogleApi.DFAReporting.V34.Model.CampaignManagerIds.t`, *default:* `nil`) - Campaign Manager dimensions associated with the event.
  *   `dv3Dimensions` (*type:* `GoogleApi.DFAReporting.V34.Model.DV3Ids.t`, *default:* `nil`) - DV360 dimensions associated with the event.
  *   `insertEventType` (*type:* `String.t`, *default:* `nil`) - The type of event to insert.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Identifies what kind of resource this is. Value: the fixed string "dfareporting#customEventInsert".
  *   `matchId` (*type:* `String.t`, *default:* `nil`) - The match ID field. A match ID is your own first-party identifier that has been synced with Google using the match ID feature in Floodlight. This field is mutually exclusive with mobileDeviceId, and at least one of the two fields is required.
  *   `mobileDeviceId` (*type:* `String.t`, *default:* `nil`) - The mobile device ID. This field is mutually exclusive with matchId, and at least one of the two fields is required.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cmDimensions => GoogleApi.DFAReporting.V34.Model.CampaignManagerIds.t() | nil,
          :dv3Dimensions => GoogleApi.DFAReporting.V34.Model.DV3Ids.t() | nil,
          :insertEventType => String.t() | nil,
          :kind => String.t() | nil,
          :matchId => String.t() | nil,
          :mobileDeviceId => String.t() | nil
        }

  field(:cmDimensions, as: GoogleApi.DFAReporting.V34.Model.CampaignManagerIds)
  field(:dv3Dimensions, as: GoogleApi.DFAReporting.V34.Model.DV3Ids)
  field(:insertEventType)
  field(:kind)
  field(:matchId)
  field(:mobileDeviceId)
end

defimpl Poison.Decoder, for: GoogleApi.DFAReporting.V34.Model.CustomEventInsert do
  def decode(value, options) do
    GoogleApi.DFAReporting.V34.Model.CustomEventInsert.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DFAReporting.V34.Model.CustomEventInsert do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
